<?php

class SucculentFlowerportUnlockAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * @param $userId
     * @param $reqTime
     * @param $row
     * @param $num
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId,$row,$num,$reqTime)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_SUCCLENT_PLANT)) {
            return $this->buildResponse(false);
        }
        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);
        return $this->buildResponse(
            SucculentService::get()->flowerportUnlock($userId,$row,$num,$reqTime)
        );
    }
}